﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActualsBreakDown.aspx.cs"
    Inherits="Actuals.ActualsBreakDown" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Show Dashboard</title>
    <link href="~/Actuals.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <center>
        <div>
            <asp:Label ID="Label2" runat="server" CssClass="ParaTitle">Dashboard </asp:Label>
        </div>
        <div>
            <table>
                  <tr>
                            <td>
                                <asp:Label ID="Label1" runat="server" CssClass="label">Project</asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProject" runat="server" CssClass="textfield" AutoPostBack="true"
                                    OnSelectedIndexChanged="ddlProject_OnSelectedIndexChanged">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label8" runat="server" CssClass="label">Release</asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlRelease" runat="server" CssClass="textfield " AutoPostBack="true" 
                                OnSelectedIndexChanged="ddlRelease_OnSelectedIndexChanged" >
                                </asp:DropDownList>
                            </td>
                        </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label5" runat="server" CssClass="label">SearchType </asp:Label>
                    </td>
                    <td class="labelRequiredField">
                        <asp:DropDownList ID="ddlSearchType" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlSearchType_OnSelectedIndexChanged">
                            <asp:ListItem Value="0"> Select </asp:ListItem>
                            <asp:ListItem Value="1"> By Sprint</asp:ListItem>
                            <asp:ListItem Value="2"> By Date</asp:ListItem>
                            <asp:ListItem Value="3"> All For This Release </asp:ListItem>
                        </asp:DropDownList>
                        *
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="ddlSearchType"
                            ErrorMessage="Required" runat="server" InitialValue="Select" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label7" runat="server" CssClass="label">Sprint </asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSprint" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlSprint_OnSelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" runat="server" CssClass="label">StartDate </asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtStartDate" runat="server" CssClass="textfield"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label6" runat="server" CssClass="label">EndDate </asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtEndDate" runat="server" CssClass="textfield"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnGetBreakDown" runat="server" Text="Get Breakdown" OnClick="btnGetBreakDown_OnClick" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="divGrid" style="border: solid 1px silver; height: 500px; text-align: center;
            overflow-x: hidden; overflow-y: auto;"  >
            <table border=1>
                <tr>
                    <td>
                        Total hrs for fulltimers
                    </td>
                    <td  >
                        Total hrs for parttimers
                    </td>
                    <td  >
                        Total actual hrs entered by developers
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:GridView ID="gvActualFigures" AutoGenerateColumns="false" BorderColor="Black"
                            runat="server" AllowPaging="false" AllowSorting="true" ShowFooter="true" OnRowDataBound="gvActualFigures_RowDataBound">
                            <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                            <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                                BorderStyle="None" />
                            <FooterStyle BackColor="Goldenrod" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <Columns>
                                <asp:TemplateField HeaderText="Task">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTask" runat="server" Text='<%# Bind("NickName") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NoOfDays">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoOfDays" runat="server" Text='<%# Bind("NoOfDays") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NoOfHoursPerDay">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoOfHoursPerDay" runat="server" Text='<%# Bind("HoursPerDay") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="TotalHours">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTotalHours" runat="server" Text='<%# Bind("TotalHours") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td valign="top">
                    <asp:GridView ID="gvActualFiguresPartTimers" AutoGenerateColumns="false" BorderColor="Black"
                        runat="server" AllowPaging="false" AllowSorting="true" ShowFooter="true" OnRowDataBound="gvActualFiguresPartTimers_RowDataBound">
                        <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                        <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                        <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                            BorderStyle="None" />
                        <FooterStyle BackColor="Goldenrod" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                        <Columns>
                            <asp:TemplateField HeaderText="Task">
                                <ItemTemplate>
                                    <asp:Label ID="lblNickName" runat="server" Text='<%# Bind("NickName") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Date">
                                <ItemTemplate>
                                    <asp:Label ID="lblWorkDate" runat="server" Text='<%# String.Format("{0:M/d/yyyy}",Eval("WorkDate")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="NoOfHours">
                                <ItemTemplate>
                                    <asp:Label ID="lblHoursPerDay" runat="server" Text='<%# Bind("HoursPerDay") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="TotalHours">
                                <ItemTemplate>
                                    <asp:Label ID="lblTotalHours" runat="server" Text='<%# Bind("TotalHours") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>                    
                    </td>
                    <td valign="top">
                        <asp:GridView ID="gvActualsByEmp" AutoGenerateColumns="false" BorderColor="Black"
                            runat="server" AllowPaging="false" AllowSorting="true" ShowFooter="true">
                            <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                            <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                                BorderStyle="None" />
                            <FooterStyle BackColor="Goldenrod" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <Columns>
                                <asp:TemplateField HeaderText="Task">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTask" runat="server" Text='<%# Bind("NickName") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="TotalHrs">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoOfDays" runat="server" Text='<%# Bind("TotalHours") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label CssClass="label" ID="lblTotalActualFigures" Text="TotalActualFigures" runat="server"></asp:Label>
                        :
                        <asp:Label ID="lblTotalActualFiguresValue" CssClass="textfield" runat="server" />
                    </td>
                </tr>
            </table>
            <table border=1>
                <tr>
                    <td>
                        Breakdown for developers
                    </td>
                    <td>
                        Breakdown for BA
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:GridView ID="gvBreakDown" AutoGenerateColumns="false" BorderColor="Black" runat="server"
                            AllowPaging="false" AllowSorting="true" ShowFooter="true" OnRowDataBound="gvBreakDown_RowDataBound" >
                            <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                            <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                                BorderStyle="None" />
                            <FooterStyle BackColor="Goldenrod" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <Columns>
                              <asp:TemplateField HeaderText="TaskId">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTaskId" runat="server" Text='<%# Bind("TaskId") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Task">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTask" runat="server" Text='<%# Bind("TaskDescription") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="SubTask">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTask" runat="server" Text='<%# Bind("SubTaskDescription") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NoOfHours">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoOfHours" runat="server" Text='<%# Bind("TotalHours") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td valign="top">
                        <asp:GridView ID="gvBaBreakDown" AutoGenerateColumns="false" BorderColor="Black"
                            runat="server" AllowPaging="false" AllowSorting="true" ShowFooter="true" OnRowDataBound="gvBaBreakDown_RowDataBound">
                            <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                            <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                                BorderStyle="None" />
                            <FooterStyle BackColor="Goldenrod" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                            <Columns>
                                <asp:TemplateField HeaderText="Task">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTask" runat="server" Text='<%# Bind("TaskDescription") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="NoOfHours">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoOfHours" runat="server" Text='<%# Bind("TotalHours") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </center>
    </form>
</body>
 <script type="text/javascript">
   function ShowAddUserStory(taskid) {
            var taskId = document.getElementById("ddlTask").value;
            var url = 'AddUserStory.aspx?Mode=Add&TaskId=' + taskId;
            var result = window.showModalDialog(url, this,
                'dialogHeight:290px;dialogWidth:255px;Status:yes;Toolbars:no;Scroll:yes;Help:no;Center:yes;');
            __doPostBack('refresh', 'refresh');
        }
        </script>
</html>
